#include <iostream>
#include <vector>
#include <numeric>

using namespace std;

class UnsignedFraction {
public:
    UnsignedFraction(uint64_t num = 0, uint64_t den = 1): numerator(num), denominator(den) {
        reduce();
    }
    bool operator>(const UnsignedFraction& other) const {
        return numerator * other.denominator > denominator * other.numerator;
    }
    friend std::ostream& operator<<(std::ostream& os, const UnsignedFraction& frac) {
        if (frac.denominator == 1) 
            os << frac.numerator;
        else 
            os << frac.numerator << " / " << frac.denominator;
        return os;
    }
    ~UnsignedFraction() = default;
private:
    void reduce() {
        uint64_t common = gcd(numerator, denominator);
        numerator /= common;
        denominator /= common;
    }
    uint64_t numerator;
    uint64_t denominator;
};

int main(int argc, char* argv[]) {
    if (argv[1][0] == 'a') {
        UnsignedFraction ans {0, 1};
        for (uint64_t b = 1'000'000; b >= 777777; --b) {
            uint64_t a = 3 * b / 7;
        if (3 * b == 7 * a)
            --a;
            UnsignedFraction tmp {a, b};
            if (tmp > ans) {
                ans = tmp;
                // cout << "a: " << a << ", b: " << b << ", ans: " << ans << endl;
            }
        }
        cout << ans << endl;    // 428570 / 999997
    } else {   
        int a = 333332;
        int b = 777777;
        while (b + 7 <= 1'000'000) {
            a += 3;
            b += 7;
        // cout << a << " / " << b << endl;    
        }
        cout << a << " / " << b << endl;    
    }
}